package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.Sysnotice;
import cn.wolfcode.trip.base.domain.Syspush;
import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.mapper.SysnoticeMapper;
import cn.wolfcode.trip.base.mapper.SyspushMapper;
import cn.wolfcode.trip.base.mapper.UserMapper;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.service.ISysnoticeService;
import cn.wolfcode.trip.base.service.ISyspushService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class SyspushServiceImpl implements ISyspushService {


    @Autowired
    private SyspushMapper syspushMapper;

    @Override
    public PageInfo query(QueryObject qo) {

        PageHelper.startPage(qo.getCurrentPage(),qo.getPageSize());

        List<Syspush> list = syspushMapper.selectForlist(qo);
        return new PageInfo(list);
    }

    @Override
    public Syspush getContentByNoticeId(Long noticeId) {
        return syspushMapper.selectContetByNoticeId(noticeId);
    }

}
